import { createApp } from 'vue';
import App from './example/youHH/vueIF/index.vue';

import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';

import zhCn from 'element-plus/dist/locale/zh-cn';

// import MisUiPlus from 'mis-ui-plus';
/* import 'mis-ui-plus/dist/index.css';
import '@/styles/index.scss'; */

// svg icons
/* import 'virtual:svg-icons-register';
import SvgIcon from '@/components/SvgIcon/index.vue';
import elementIcons from '@/components/SvgIcon/elIcons'; */

/* import router from '@/routers';
import pinia from '@/stores'; */

// 注意！！！！！！ 只在需要mock模拟后端接口时使用，
// 注意！！！！！！ 如不需要mock请注释该行代码
// mock导入开始
// if (process.env.NODE_ENV === 'development') {
//   import('@mock');
// }
// mock导入结束

// main.js里手动引入
// import 'mis-ui-plus/theme-chalk/mis-editor.css';
// import MisEditor from 'mis-ui-plus/es/mis-editor';

// 自定义插件安装
import { addGlobalPropertiesPlugin } from './example/youHH/globalProperties';
// import directives from  './directives/index.ts'

const app = createApp(App);
/* app.use(elementIcons);
app.use(MisEditor); */
// app.component('SvgIcon', SvgIcon);
app.use(ElementPlus, { size: 'default', zIndex: 3000, locale: zhCn });
// app.use(MisUiPlus);
//app.use(addGlobalPropertiesPlugin);
// app.use(directives);
app.mount('#app');

export function initApp (app) {
  /* app.use(elementIcons);
  app.use(MisEditor);
  app.component('SvgIcon', SvgIcon); */
  app.use(ElementPlus, { size: 'default', zIndex: 3000, locale: zhCn });
  // app.use(MisUiPlus);
  app.use(addGlobalPropertiesPlugin);
  // app.use(directives);
}
// export const globalApp = app

